/**
 * 
 */
package com.arx.interactive.data;

import java.awt.Color;

import com.arx.common.GlobalConsts;
import com.arx.interactive.InteractiveObject;
import com.dalonedrau.opengl.Vector3;

/**
 * @author Donald
 */
public final class NPCData {
	private float				absorb;
	private long				aiming_start;
	private float				aimtime;
	private float				armor_class;
	private float				backstab_skill;
	private long				behavior;
	private float				behavior_param;
	public float getBehavior_param() {
		return behavior_param;
	}
	public void setBehavior_param(float behavior_param) {
		this.behavior_param = behavior_param;
	}
	// EERIE_EXTRA_ROTATE * ex_rotate;
	private Color				blood_color;
	private float				climb_count;
	private long				collid_state;
	private long				collid_time;
	private float				critical;
	private long				cut;
	private short				cuts;
	private float				damages;
	private long				detect;
	private float				fDetect;
	private long				fightdecision;
	private Vector3				last_splat_pos;
	private float				lastmouth;
	private float				life;
	private float				look_around_inc;
	private long				ltemp;
	private float				mana;
	private float				maxlife;
	private float				maxmana;
	private int				movemode;

	/**
	 * Gets the movemode 
	 * @return {@link int}
	 */
	public int getMovemode() {
		return movemode;
	}
	/**
	 * Sets the movemode
	 * @param movemode the movemode to set
	 */
	public void setMovemode(int movemode) {
		this.movemode = movemode;
	}
	private float				moveproblem;
	private long				npcflags;

	private char				padd;
	private PathfinderData		pathfind;
	private float				poisoned;
	private float				reach;

	/** Is target in REACHZONE ? */
	long						reachedtarget;
	private long				reachedtime;
	private char				resist_fire;
	private char				resist_magic;
	private char				resist_poison;

	private float				speakpitch;
	private short				SPLAT_DAMAGES;
	private short				SPLAT_TOT_NB;
	private BehaviorData[]		stacked		= new BehaviorData[GlobalConsts.MAX_STACKED_BEHAVIOR];
	public BehaviorData getStackedBehavior(final int index) {
		BehaviorData bd = null;
		if (index >= 0
				&& index < GlobalConsts.MAX_STACKED_BEHAVIOR) {
			bd = stacked[index];
		}
		return bd;
	}
	private float				stare_factor;
	private short				strike_time;

	/** 0=none ; 1=side ; 2=side+back. */
	private byte				tactics;
	/**
	 * Gets the tactics 
	 * @return {@link byte}
	 */
	public byte getTactics() {
		return tactics;
	}
	/**
	 * Sets the tactics
	 * @param tactics the tactics to set
	 */
	public void setTactics(byte tactics) {
		this.tactics = tactics;
	}
	private float				tohit;
	private short				unused;
	private float				vvpos;
	private short				walk_start_time;
	/** Linked Weapon (r-hand). */
	private InteractiveObject	weapon;
	private long				weaponinhand;
	private char[]				weaponname	= new char[256];

	private long				weapontype;
	private long				xpvalue;
	/**
	 * Gets the life
	 * @return {@link float}
	 */
	public float getLife() {
		return life;
	}
	/**
	 * Gets the mana
	 * @return {@link float}
	 */
	public float getMana() {
		return mana;
	}
	/**
	 * Gets the maxlife
	 * @return {@link float}
	 */
	public float getMaxlife() {
		return maxlife;
	}
	/**
	 * Gets the maxmana
	 * @return {@link float}
	 */
	public float getMaxmana() {
		return maxmana;
	}

	public float getPoisoned() {
		return poisoned;
	}
	/**
	 * Gets the weapon.
	 * @return {@link InteractiveObject}
	 */
	public InteractiveObject getWeapon() {
		return weapon;
	}
	/**
	 * Determines if the {@link NPCData} has a specific behavior flag set.
	 * @param flag the flag
	 * @return true if the object has the flag set; false otherwise
	 */
	public boolean hasBehavior(final int flag) {
		return (behavior & flag) == flag;
	}
	/**
	 * Sets the life
	 * @param life the life to set
	 */
	public void setLife(float life) {
		this.life = life;
	}

	/**
	 * Sets the mana
	 * @param mana the mana to set
	 */
	public void setMana(float mana) {
		this.mana = mana;
	}
	/**
	 * Sets the maxlife
	 * @param maxlife the maxlife to set
	 */
	public void setMaxlife(float maxlife) {
		this.maxlife = maxlife;
	}
	/**
	 * Sets the maxmana
	 * @param maxmana the maxmana to set
	 */
	public void setMaxmana(float maxmana) {
		this.maxmana = maxmana;
	}
	public void setPoisoned(float poisoned) {
		this.poisoned = poisoned;
	}
	/**
	 * Sets the weapon
	 * @param weapon the weapon to set
	 */
	public void setWeapon(InteractiveObject weapon) {
		this.weapon = weapon;
	}
	public long getBehavior() {
		return behavior;
	}
	public void setBehavior(long behavior) {
		this.behavior = behavior;
	}
}
